#!/usr/bin/perl -w

use Net::SFTP;
# use Net::SSH::Perl;

sub sftpTest() {
  my $host = "192.168.4.84";
  my $user = "etl";
  my $pwd = "etl";
  my %args = ( user=>$user, password=>$pwd, debug=>1, ssh_args=>[port=>22], );

  my $sftp = Net::SFTP->new($host, user=>$user, password=>$pwd, debug=>0, ssh_args=>[port=>22],);

#   print("status: ". $sftp->status . "\n");

#   my @filelist = $sftp->ls("/home/etl");

#   foreach my $fileInfo (@filelist) {
#     # print("fileInfo:". $fileInfo);
#     foreach my $filekey (keys %$fileInfo) {
#       print(" fileKey:" . $filekey . " value:" . $$fileInfo{$filekey} . "\n");
#     }
#   }
}

sub sftpTest2() {
  my $host = "8.131.73.2";
  my $user = "grpdata";
  my $pwd = "RhZth5tKpTtKL7xf";
  my %args = ( user=>$user, password=>$pwd, debug=>1, ssh_args=>[port=>10022], );

  my $sftp = Net::SFTP->new($host, user=>$user, password=>$pwd, debug=>0, ssh_args=>[port=>10022],);

#   print("status: ". $sftp->status . "\n");

#   my @filelist = $sftp->ls("/home/etl");

#   foreach my $fileInfo (@filelist) {
#     # print("fileInfo:". $fileInfo);
#     foreach my $filekey (keys %$fileInfo) {
#       print(" fileKey:" . $filekey . " value:" . $$fileInfo{$filekey} . "\n");
#     }
#   }
}


sftpTest();


# my $ftp = Ftp_Connect("SFTP", "192.168.4.84", 22, "etl:etl", "N", 3);